package com.android.baselibrary.base

import androidx.recyclerview.widget.RecyclerView
import com.android.baselibrary.customview.BaseCustomViewModel


inline fun <reified S : BaseCustomViewModel>
        RecyclerView.bindAdapter(
    block: BaseRecyclerAdapter< S>.() -> Unit
):BaseRecyclerAdapter< S> {
    val baseRecyclerAdapter = BaseRecyclerAdapter< S>()
    adapter = baseRecyclerAdapter
    block.invoke(baseRecyclerAdapter)
    return baseRecyclerAdapter
}